function newX = xt_set(X, xtflag, xtval)
% xtflag: panel flag
% xtval : panel value
% X: data

newX = [];

nflag = length(xtval);

for i=1:1:nflag
    
    temp_X = X(xtflag==xtval(i),:);
    
    newX = [newX; temp_X];
    
    
end